3.2 \(\int (c e+d e x)^2 (a+b \tan ^{-1}(c+d x)) \, dx\)

Optimal. Leaf size=67 \[ \frac {e^2 (c+d x)^3 \left (a+b \tan ^{-1}(c+d x)\right )}{3 d}-\frac {b e^2 (c+d x)^2}{6 d}+\frac {b e^2 \log \left ((c+d x)^2+1\right )}{6 d} \]

[Out]

-1/6*b*e^2*(d*x+c)^2/d+1/3*e^2*(d*x+c)^3*(a+b*arctan(d*x+c))/d+1/6*b*e^2*ln(1+(d*x+c)^2)/d

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 67, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {5043, 12, 4852, 266, 43} \[ \frac {e^2 (c+d x)^3 \left (a+b \tan ^{-1}(c+d x)\right )}{3 d}-\frac {b e^2 (c+d x)^2}{6 d}+\frac {b e^2 \log \left ((c+d x)^2+1\right )}{6 d} \]

Antiderivative was successfully verified.

[In]

Int[(c*e + d*e*x)^2*(a + b*ArcTan[c + d*x]),x]

[Out]

-(b*e^2*(c + d*x)^2)/(6*d) + (e^2*(c + d*x)^3*(a + b*ArcTan[c + d*x]))/(3*d) + (b*e^2*Log[1 + (c + d*x)^2])/(6
*d)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 266

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 4852

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*ArcTa
n[c*x])^p)/(d*(m + 1)), x] - Dist[(b*c*p)/(d*(m + 1)), Int[((d*x)^(m + 1)*(a + b*ArcTan[c*x])^(p - 1))/(1 + c^
2*x^2), x], x] /; FreeQ[{a, b, c, d, m}, x] && IGtQ[p, 0] && (EqQ[p, 1] || IntegerQ[m]) && NeQ[m, -1]

Rule 5043

Int[((a_.) + ArcTan[(c_) + (d_.)*(x_)]*(b_.))^(p_.)*((e_.) + (f_.)*(x_))^(m_.), x_Symbol] :> Dist[1/d, Subst[I
nt[((f*x)/d)^m*(a + b*ArcTan[x])^p, x], x, c + d*x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[d*e - c*f, 0
] && IGtQ[p, 0]

Rubi steps

\begin {align*} \int (c e+d e x)^2 \left (a+b \tan ^{-1}(c+d x)\right ) \, dx &=\frac {\operatorname {Subst}\left (\int e^2 x^2 \left (a+b \tan ^{-1}(x)\right ) \, dx,x,c+d x\right )}{d}\\ &=\frac {e^2 \operatorname {Subst}\left (\int x^2 \left (a+b \tan ^{-1}(x)\right ) \, dx,x,c+d x\right )}{d}\\ &=\frac {e^2 (c+d x)^3 \left (a+b \tan ^{-1}(c+d x)\right )}{3 d}-\frac {\left (b e^2\right ) \operatorname {Subst}\left (\int \frac {x^3}{1+x^2} \, dx,x,c+d x\right )}{3 d}\\ &=\frac {e^2 (c+d x)^3 \left (a+b \tan ^{-1}(c+d x)\right )}{3 d}-\frac {\left (b e^2\right ) \operatorname {Subst}\left (\int \frac {x}{1+x} \, dx,x,(c+d x)^2\right )}{6 d}\\ &=\frac {e^2 (c+d x)^3 \left (a+b \tan ^{-1}(c+d x)\right )}{3 d}-\frac {\left (b e^2\right ) \operatorname {Subst}\left (\int \left (1+\frac {1}{-1-x}\right ) \, dx,x,(c+d x)^2\right )}{6 d}\\ &=-\frac {b e^2 (c+d x)^2}{6 d}+\frac {e^2 (c+d x)^3 \left (a+b \tan ^{-1}(c+d x)\right )}{3 d}+\frac {b e^2 \log \left (1+(c+d x)^2\right )}{6 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 54, normalized size = 0.81 \[ \frac {e^2 \left (\frac {1}{3} (c+d x)^3 \left (a+b \tan ^{-1}(c+d x)\right )-\frac {1}{6} b \left ((c+d x)^2-\log \left ((c+d x)^2+1\right )\right )\right )}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[(c*e + d*e*x)^2*(a + b*ArcTan[c + d*x]),x]

[Out]

(e^2*(((c + d*x)^3*(a + b*ArcTan[c + d*x]))/3 - (b*((c + d*x)^2 - Log[1 + (c + d*x)^2]))/6))/d

________________________________________________________________________________________

fricas [B]  time = 0.66, size = 129, normalized size = 1.93 \[ \frac {2 \, a d^{3} e^{2} x^{3} + {\left (6 \, a c - b\right )} d^{2} e^{2} x^{2} + 2 \, {\left (3 \, a c^{2} - b c\right )} d e^{2} x + b e^{2} \log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right ) + 2 \, {\left (b d^{3} e^{2} x^{3} + 3 \, b c d^{2} e^{2} x^{2} + 3 \, b c^{2} d e^{2} x + b c^{3} e^{2}\right )} \arctan \left (d x + c\right )}{6 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*e*x+c*e)^2*(a+b*arctan(d*x+c)),x, algorithm="fricas")

[Out]

1/6*(2*a*d^3*e^2*x^3 + (6*a*c - b)*d^2*e^2*x^2 + 2*(3*a*c^2 - b*c)*d*e^2*x + b*e^2*log(d^2*x^2 + 2*c*d*x + c^2
 + 1) + 2*(b*d^3*e^2*x^3 + 3*b*c*d^2*e^2*x^2 + 3*b*c^2*d*e^2*x + b*c^3*e^2)*arctan(d*x + c))/d

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \mathit {sage}_{0} x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*e*x+c*e)^2*(a+b*arctan(d*x+c)),x, algorithm="giac")

[Out]

sage0*x

________________________________________________________________________________________

maple [B]  time = 0.04, size = 161, normalized size = 2.40 \[ \frac {d^{2} x^{3} a \,e^{2}}{3}+d \,x^{2} a c \,e^{2}+x a \,c^{2} e^{2}+\frac {a \,c^{3} e^{2}}{3 d}+\frac {d^{2} \arctan \left (d x +c \right ) x^{3} b \,e^{2}}{3}+d \arctan \left (d x +c \right ) x^{2} b c \,e^{2}+\arctan \left (d x +c \right ) x b \,c^{2} e^{2}+\frac {\arctan \left (d x +c \right ) b \,c^{3} e^{2}}{3 d}-\frac {d \,x^{2} b \,e^{2}}{6}-\frac {x b c \,e^{2}}{3}-\frac {b \,c^{2} e^{2}}{6 d}+\frac {b \,e^{2} \ln \left (1+\left (d x +c \right )^{2}\right )}{6 d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*e*x+c*e)^2*(a+b*arctan(d*x+c)),x)

[Out]

1/3*d^2*x^3*a*e^2+d*x^2*a*c*e^2+x*a*c^2*e^2+1/3/d*a*c^3*e^2+1/3*d^2*arctan(d*x+c)*x^3*b*e^2+d*arctan(d*x+c)*x^
2*b*c*e^2+arctan(d*x+c)*x*b*c^2*e^2+1/3/d*arctan(d*x+c)*b*c^3*e^2-1/6*d*x^2*b*e^2-1/3*x*b*c*e^2-1/6/d*b*c^2*e^
2+1/6*b*e^2*ln(1+(d*x+c)^2)/d

________________________________________________________________________________________

maxima [B]  time = 0.42, size = 238, normalized size = 3.55 \[ \frac {1}{3} \, a d^{2} e^{2} x^{3} + a c d e^{2} x^{2} + {\left (x^{2} \arctan \left (d x + c\right ) - d {\left (\frac {x}{d^{2}} + \frac {{\left (c^{2} - 1\right )} \arctan \left (\frac {d^{2} x + c d}{d}\right )}{d^{3}} - \frac {c \log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right )}{d^{3}}\right )}\right )} b c d e^{2} + \frac {1}{6} \, {\left (2 \, x^{3} \arctan \left (d x + c\right ) - d {\left (\frac {d x^{2} - 4 \, c x}{d^{3}} - \frac {2 \, {\left (c^{3} - 3 \, c\right )} \arctan \left (\frac {d^{2} x + c d}{d}\right )}{d^{4}} + \frac {{\left (3 \, c^{2} - 1\right )} \log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right )}{d^{4}}\right )}\right )} b d^{2} e^{2} + a c^{2} e^{2} x + \frac {{\left (2 \, {\left (d x + c\right )} \arctan \left (d x + c\right ) - \log \left ({\left (d x + c\right )}^{2} + 1\right )\right )} b c^{2} e^{2}}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*e*x+c*e)^2*(a+b*arctan(d*x+c)),x, algorithm="maxima")

[Out]

1/3*a*d^2*e^2*x^3 + a*c*d*e^2*x^2 + (x^2*arctan(d*x + c) - d*(x/d^2 + (c^2 - 1)*arctan((d^2*x + c*d)/d)/d^3 -
c*log(d^2*x^2 + 2*c*d*x + c^2 + 1)/d^3))*b*c*d*e^2 + 1/6*(2*x^3*arctan(d*x + c) - d*((d*x^2 - 4*c*x)/d^3 - 2*(
c^3 - 3*c)*arctan((d^2*x + c*d)/d)/d^4 + (3*c^2 - 1)*log(d^2*x^2 + 2*c*d*x + c^2 + 1)/d^4))*b*d^2*e^2 + a*c^2*
e^2*x + 1/2*(2*(d*x + c)*arctan(d*x + c) - log((d*x + c)^2 + 1))*b*c^2*e^2/d

________________________________________________________________________________________

mupad [B]  time = 1.17, size = 144, normalized size = 2.15 \[ \frac {a\,d^2\,e^2\,x^3}{3}-\frac {b\,c\,e^2\,x}{3}+\frac {b\,e^2\,\ln \left (c^2+2\,c\,d\,x+d^2\,x^2+1\right )}{6\,d}+a\,c^2\,e^2\,x-\frac {b\,d\,e^2\,x^2}{6}+b\,c^2\,e^2\,x\,\mathrm {atan}\left (c+d\,x\right )+a\,c\,d\,e^2\,x^2+\frac {b\,c^3\,e^2\,\mathrm {atan}\left (c+d\,x\right )}{3\,d}+\frac {b\,d^2\,e^2\,x^3\,\mathrm {atan}\left (c+d\,x\right )}{3}+b\,c\,d\,e^2\,x^2\,\mathrm {atan}\left (c+d\,x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c*e + d*e*x)^2*(a + b*atan(c + d*x)),x)

[Out]

(a*d^2*e^2*x^3)/3 - (b*c*e^2*x)/3 + (b*e^2*log(c^2 + d^2*x^2 + 2*c*d*x + 1))/(6*d) + a*c^2*e^2*x - (b*d*e^2*x^
2)/6 + b*c^2*e^2*x*atan(c + d*x) + a*c*d*e^2*x^2 + (b*c^3*e^2*atan(c + d*x))/(3*d) + (b*d^2*e^2*x^3*atan(c + d
*x))/3 + b*c*d*e^2*x^2*atan(c + d*x)

________________________________________________________________________________________

sympy [A]  time = 3.93, size = 182, normalized size = 2.72 \[ \begin {cases} a c^{2} e^{2} x + a c d e^{2} x^{2} + \frac {a d^{2} e^{2} x^{3}}{3} + \frac {b c^{3} e^{2} \operatorname {atan}{\left (c + d x \right )}}{3 d} + b c^{2} e^{2} x \operatorname {atan}{\left (c + d x \right )} + b c d e^{2} x^{2} \operatorname {atan}{\left (c + d x \right )} - \frac {b c e^{2} x}{3} + \frac {b d^{2} e^{2} x^{3} \operatorname {atan}{\left (c + d x \right )}}{3} - \frac {b d e^{2} x^{2}}{6} + \frac {b e^{2} \log {\left (\frac {c}{d} + x - \frac {i}{d} \right )}}{3 d} - \frac {i b e^{2} \operatorname {atan}{\left (c + d x \right )}}{3 d} & \text {for}\: d \neq 0 \\c^{2} e^{2} x \left (a + b \operatorname {atan}{\relax (c )}\right ) & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*e*x+c*e)**2*(a+b*atan(d*x+c)),x)

[Out]

Piecewise((a*c**2*e**2*x + a*c*d*e**2*x**2 + a*d**2*e**2*x**3/3 + b*c**3*e**2*atan(c + d*x)/(3*d) + b*c**2*e**
2*x*atan(c + d*x) + b*c*d*e**2*x**2*atan(c + d*x) - b*c*e**2*x/3 + b*d**2*e**2*x**3*atan(c + d*x)/3 - b*d*e**2
*x**2/6 + b*e**2*log(c/d + x - I/d)/(3*d) - I*b*e**2*atan(c + d*x)/(3*d), Ne(d, 0)), (c**2*e**2*x*(a + b*atan(
c)), True))

________________________________________________________________________________________